package com.ccl.iot.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @description：
 * @author： HD
 * @time：2017/9/6
 */

public class DateTime implements Parcelable {

    private int years;
    private int months;
    private int days;
    private int hours;
    private int minutes;

    public int getYears() {
        return years;
    }

    public void setYears(int years) {
        this.years = years;
    }

    public int getMonths() {
        return months;
    }

    public void setMonths(int months) {
        this.months = months;
    }

    public int getDays() {
        return days;
    }

    public void setDays(int days) {
        this.days = days;
    }

    public int getHours() {
        return hours;
    }

    public void setHours(int hours) {
        this.hours = hours;
    }

    public int getMinutes() {
        return minutes;
    }

    public void setMinutes(int minutes) {
        this.minutes = minutes;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.years);
        dest.writeInt(this.months);
        dest.writeInt(this.days);
        dest.writeInt(this.hours);
        dest.writeInt(this.minutes);
    }

    public DateTime() {
    }

    protected DateTime(Parcel in) {
        this.years = in.readInt();
        this.months = in.readInt();
        this.days = in.readInt();
        this.hours = in.readInt();
        this.minutes = in.readInt();
    }

    public static final Parcelable.Creator<DateTime> CREATOR = new Parcelable.Creator<DateTime>() {
        @Override
        public DateTime createFromParcel(Parcel source) {
            return new DateTime(source);
        }

        @Override
        public DateTime[] newArray(int size) {
            return new DateTime[size];
        }
    };
}
